{SetA_West} - {SetB_East}{SW_Name}
View Slow Way');
var slowways = sw.plot(map, 'grey', 0.5, "(SetA_West <> 'PO1 1QB' and SetB_East <> 'PO1 1QB' ) and Life_Cycle='Live' ", 0);
const focus = new Settlement(accessToken, surl, '
{Settlement}
View routes from {Settlement}');
var f = focus.plot(map, '#A101BC', '#8000D0', 0.4, "LifeCycle='Live' and (Settlement = 'Portsmouth' or Settlement = 'Havant' )", 1);
const c = new Settlement(accessToken, surl, '
{Settlement}
View routes from {Settlement}');
var cities = c.plot(map, '#A101BC', '#8000D0', 0.4, "LifeCycle='Live'", 0);
var citieson = c.plot(map, '#8000D0', '#8000D0', 1, "Settlement ='Portsmouth' or Settlement='Havant'", 1);
const r = new Route(accessToken, rurl, '
{SetA_West} - {SetB_East}
{SW_Name_1_}
View Route Details
Suggest a better route
Download route (.gpx)
Open in OS maps
Print (via Inkatlas)
');
var routes = r.plot(map, '#50D000', 1, "UniqueCode <> 8325", 0);
var overlays = {
"Routes": routes,
"Slow Ways": slowways,
"Settlements": cities,
};
mapsObj.setLayers(map, overlays);
/* fit bounds on slowways found */
var query = L.esri.query({
url: rurl
});
query.where("UniqueCode = 8325").bounds(function(error, latLngBounds, response) {
if (error) {
console.log(error);
return;
}
map.fitBounds(latLngBounds.pad(0.5));
var centerPoint = map.getSize().divideBy(2);
targetPoint = centerPoint.subtract([100, 0]);
targetLatLng = map.containerPointToLatLng(targetPoint);
map.panTo(targetLatLng);
new L.control.scale({
position: 'bottomright',
imperial: false,
maxWidth: 150
}).addTo(map);
mapsObj.addMiniMap(map);
});
var un_verified_query_string = "UniqueCode = 8325";
var verified_query_string = "";
if (un_verified_query_string != '') {
r.plot(map, '#009565', 1, un_verified_query_string, 1);
}
if (verified_query_string != '') {
r.plot(map, '#8000d0', 1, verified_query_string, 1);
}
Our website uses cookies to improve your experience
By clicking “Accept”, you agree to our website's cookie use as described in our Cookie Policy. You can change your cookie settings at any time by clicking “Preferences”.
Cookie settings
Our website stores four types of cookies. At any time you can choose which cookies you accept and which you refuse.
Find out more about cookies and what cookies we store in our Cookie Policy.